package com.maple.exclusivesport;

import android.content.Context;
import android.net.Uri;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import java.io.File;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by maple on 2019/8/20 14:39
 * E-Mail Address：740917401@qq.com
 */
public class PersonImageDialog extends BaseDialog {

    String url;
    @Bind(R.id.imgCiv)
    ImageView imgCiv;




    public PersonImageDialog(Context context, String url) {
        super(context);
        this.url = url;

    }


    @Override
    protected View contentView(ViewGroup parent) {

        View view = View.inflate(getContext(), R.layout.dialog_person_image, null); // 设置弹窗
        ButterKnife.bind(this,view);
        GlideLoadUtils.getInstance().glideLoad(getContext(), Uri.fromFile(new File(url)),imgCiv,-1);
        imgCiv.setOnClickListener((v)->dismiss());
        setCanceledOnTouchOutside(true);
        return view;
    }


}
